|
GUI Help > Special > addToolbarButton
|
addToolbarButton
|
|
addToolbarButton handle gadget, [int index] | [str imageFile], [tooltip]
|
Description:
Adds a button to a toolbar gadget. You can either add a standard button by specifying its index, or you can load the icon for the button from a file. You may optionally specify tooltip text which appears when the user holds their mouse over the button.
|
Return Value:
|
|
Parameters:
|
|
gadget
|
Hande to a toolbar gadget.
|
|
index
|
Index of the image to add. Specify EITHER this index OR a filename.
After creating the toolbar, call addStandardToolbarButtons, and then use these values for the index from the constants file:
TOOLBAR_CUT
TOOLBAR_COPY
TOOLBAR_PASTE
TOOLBAR_UNDO
TOOLBAR_REDO
TOOLBAR_DELETE
TOOLBAR_NEW
TOOLBAR_OPEN
TOOLBAR_SAVE
TOOLBAR_PRINTPREVIEW
TOOLBAR_PROPERTIES
TOOLBAR_HELP
TOOLBAR_FIND
TOOLBAR_REPLACE
TOOLBAR_PRINT
|
|
imageFile
|
If specified, the filename of the image to use as the icon for the new button.
|
|
[tooltip]
|
Optional. Text of the tooltip associated with the button. You will see this text when you hold the mouse over the button.
|
|
|
|
|
|
|
|
|
|
|
Remarks:
|
See Also:
|
Example:
(Note: You will need to include the GUI constants file for this example to work)
|